//引入模块
const express = require("express");
const bodyParser = require("body-parser");

//创建服务
let server = express();

//静态资源
server.use(express.static("./../src"));

//中间件
server.use(bodyParser.urlencoded({ extended: false }));
server.use(bodyParser.json());


server.use("/account", require("./router/accountRouter").router)
//
// //购车的路由
server.use("/cart", require("./router/cartRouter").router)

// 详情页的路由
server.use("/dt",require("./router/detailsRouter").router)

// 设置监听
server.listen(8080, () => {
  console.log("服务器启动完毕! http://127.0.0.1:8080");
})